
// LoadQQProcInfoDlg.h : header file
//

#pragma once
#include "ConstDefinition.h"
#include "tlhelp32.h"
// CLoadQQProcInfoDlg dialog
class CLoadQQProcInfoDlg : public CDialogEx
{
// Construction
public:
	CLoadQQProcInfoDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_LOADQQPROCINFO_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	HWND g_hWnd;
	CWnd * g_pCurrWnd;

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedBtnLoadprocinfo();


	BOOL ProcessIdToName(LPTSTR lpszProcessName, DWORD PID);
	void QQFind();
	BOOL FindQQLoginWinEx();

	void RetrieveClassPriority( PROCESSENTRY32 &pe32, HANDLE &hProcess );

	BOOL CALLBACK EnumChildWindowCallBack(HWND hWnd, LPARAM lParam);
	BOOL CALLBACK EnumWindowCallBack(HWND hWnd, LPARAM lParam);
	void PrintError( TCHAR* msg );
	void PrintLog( LPCTSTR p_strLog, E_LogType p_eLogType /*= LogType_Console*/ );
	HWND GetWindowHandleByPID(DWORD dwProcessID);
	DWORD FindProcess(char *strProcessName);
	HWND CreateMyProcess();


private:
	CStdioFile m_fLogFile;
	E_LogType m_emLogType;
	BOOL		m_BSearchStatus;

//	CListBox m_lbxProcessInfo;
public:
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	CListCtrl m_lstProcessInfo;
};
